package com.yanqu.road.entity.activity.guagifts;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_u_gua_gift", desc = "孤寡礼物数据")
public class UserGuaGiftData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, desc = "活动id")
    private int activityId;
    @FieldTypeAnnotation(select = true, update = true, desc = "用户id")
    private long userId;
    @FieldTypeAnnotation(desc = "对方id")
    private long targetUserId;
    @FieldTypeAnnotation(desc = "送礼类型")
    private int giftType;
    @FieldTypeAnnotation(desc = "道具id")
    private int goodsId;
    @FieldTypeAnnotation(desc = "道具数量")
    private int goodsCount;
    @FieldTypeAnnotation(desc = "送礼时间")
    private long giftTime;
    @FieldTypeAnnotation(desc = "留言")
    private String content = "";
    @FieldTypeAnnotation(desc = "状态")
    private int status;

    public UserGuaGiftData(int activityId, long userId, long targetUserId, long giftTime, int giftType) {
        this.activityId = activityId;
        this.userId = userId;
        this.targetUserId = targetUserId;
        this.giftTime = giftTime;
        this.giftType = giftType;
        setInsertOption();
    }

    public UserGuaGiftData() {
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public long getTargetUserId() {
        return targetUserId;
    }
    public void setTargetUserId(long targetUserId) {
        if (this.targetUserId != targetUserId) {
            this.targetUserId = targetUserId;
            setOp(DataStatus.Update);
        }
    }

    public int getGoodsId() {
        return goodsId;
    }
    public void setGoodsId(int goodsId) {
        if (this.goodsId != goodsId) {
            this.goodsId = goodsId;
            setOp(DataStatus.Update);
        }
    }

    public int getGoodsCount() {
        return goodsCount;
    }
    public void setGoodsCount(int goodsCount) {
        if (this.goodsCount != goodsCount) {
            this.goodsCount = goodsCount;
            setOp(DataStatus.Update);
        }
    }

    public long getGiftTime() {
        return giftTime;
    }
    public void setGiftTime(long giftTime) {
        if (this.giftTime != giftTime) {
            this.giftTime = giftTime;
            setOp(DataStatus.Update);
        }
    }

    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        if (content == null){
            return;
        }
        if (this.content == null || !this.content.equals(content)) {
            this.content = content;
            setOp(DataStatus.Update);
        }
    }

    public int getStatus() {
        return status;
    }
    public void setStatus(int status) {
        if (this.status != status) {
            this.status = status;
            setOp(DataStatus.Update);
        }
    }

    public int getGiftType() {
        return giftType;
    }

    public void setGiftType(int giftType) {
        this.giftType = giftType;
    }
}
